!function () {
	layui.config({base: '/js/'}).use(['element'], function () {
		var $ = layui.jquery, element = layui.element;
		var $tabBody = $('#tabBody');
		// 点击导航菜单
		element.on('nav(layuiNav)', function (elem) {
			var layHref = elem.attr('lay-href');
			if (layHref) $tabBody.attr('src', layHref);
		});
		// 刷新页面内容
		element.on('nav(refresh)', function (elem) {
			var event = elem.attr('lay-event');
			if ('flexible' == event) { // 搜索侧边栏代码
				/**
				 * 搜索侧边栏代码
				 */
			} else if ('refresh' == event) { // 刷新
				$tabBody.attr('src', $('#navigation .layui-this>a').attr('lay-href'));
			}
		});

        // 个人操作
        element.on('nav(opts)', function (elem) {
            var event = elem.attr('lay-event');
            if ('resetPass' == event){
                var layHref = elem.attr('lay-href');
                $tabBody.attr('src', layHref);
			}

        });
	});
}();